<? $header->display();

if (isset($breadcrumb)) { ?>
	<div class="breadcrumb">
	<a href="<?=$topURL?>">General Media &gt;</a>
	<?
	foreach($breadcrumb as $item) {
		$item->display();
	}
	?>
	</div>
	<?
}

if ($view == 'detail') { 
	
	$detail->display();

} else { ?>

	<h1><?=$title?></h1>
	
	<?
	
	if (isset($media)) {
		$media->display();
	}

	?>
	<div class="areas"><?
	
	if (isset($breadcrumb)) { ?>
		<h2>Sub-categories</h2>
	<? }
	
	if (isset($areas)) {
	
		foreach($areas as $area) {
			$area->display();	
		}
	
	} else {
	
		echo("No sub-categories.");
	
	}
	
	?>
	</div>
	<?
}

$footer->display(); ?>